package com.ruoyi.wms.domain.bo.stock;

import com.ruoyi.wms.domain.entity.stock.ConversionRules;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import io.github.linpeilie.annotations.AutoMapper;

import java.math.BigDecimal;

/**
 * 转换关系表业务对象 conversion_rules
 *
 * @author 邓滔滔
 * @date 2025-01-15
 */

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ConversionRules.class, reverseConvertGenerate = false)
public class ConversionRulesBo extends BaseEntity {

    /**
     * 规则
     */
    private Long ruleId;

    /**
     * 关联的规格
     */
    @NotNull(message = "关联的规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long skuId;

    /**
     * 目标产品
     */
    @NotNull(message = "目标产品不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long targetSkuId;

    /**
     * 转换比例
     */
    @NotNull(message = "转换比例不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal conversionRatio;

    /**
     * 产出率
     */
    private BigDecimal yieldRate;


}
